From 01090caec58b3d4d2ab79f8d6471ac5ecbe5a652 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Wed, 1 Dec 2021 19:43:40 +0100 Subject: [PATCH] [PATCH 108/144] do not reformat if there are uncommitted changes Gbp-Pq: Name 0108-do-not-reformat-if-there-are-uncommitted-changes.patch --- tools/scripts/format-branch.sh | 6 ++++++ tools/scripts/format-last-commit.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tools/scripts/format-branch.sh b/tools/scripts/format-branch.sh index b1bcf8f..fe532dc 100755 --- a/tools/scripts/format-branch.sh +++ b/tools/scripts/format-branch.sh @@ -5,6 +5,12 @@ if [ ! -e .git ]; then exit 1 fi +case "$(git describe --always --dirty=-DIRTY)" in + *-DIRTY) + echo "There are uncommitted changes - aborting." + exit 1 +esac + PATCHY=/tmp/p.patch rm -f $PATCHY diff --git a/tools/scripts/format-last-commit.sh b/tools/scripts/format-last-commit.sh index 5bd5e78..3040b93 100755 --- a/tools/scripts/format-last-commit.sh +++ b/tools/scripts/format-last-commit.sh @@ -5,6 +5,12 @@ if [ ! -e .git ]; then exit 1 fi +case "$(git describe --always --dirty=-DIRTY)" in + *-DIRTY) + echo "There are uncommitted changes - aborting." + exit 1 +esac + PATCHY=/tmp/p.patch rm -f $PATCHY -- 2.30.2